SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_category
-- ----------------------------
DROP TABLE IF EXISTS `t_category`;
CREATE TABLE `t_category` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of t_category
-- ----------------------------
BEGIN;
INSERT INTO `t_category` VALUES (1, '找拿铁');
INSERT INTO `t_category` VALUES (2, '找好茶');
INSERT INTO `t_category` VALUES (3, '找奶茶');
COMMIT;

-- ----------------------------
-- Table structure for t_drink
-- ----------------------------
DROP TABLE IF EXISTS `t_drink`;
CREATE TABLE `t_drink` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `create_time` date DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `category_id` bigint NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of t_drink
-- ----------------------------
BEGIN;
INSERT INTO `t_drink` VALUES (1, '2021-09-23', '焦糖红茶拿铁', 15.00, 1);
INSERT INTO `t_drink` VALUES (2, '2021-09-23', '红茶拿铁', 14.00, 1);
INSERT INTO `t_drink` VALUES (3, '2021-09-22', '绿茶拿铁', 14.00, 1);
INSERT INTO `t_drink` VALUES (4, '2021-09-22', '抹茶拿铁', 17.00, 1);
INSERT INTO `t_drink` VALUES (5, '2021-09-24', '茉莉绿茶', 8.00, 2);
INSERT INTO `t_drink` VALUES (6, '2021-09-22', '清香乌龙茶', 8.00, 2);
INSERT INTO `t_drink` VALUES (7, '2021-09-23', '翡翠柠檬', 13.00, 2);
INSERT INTO `t_drink` VALUES (8, '2021-09-22', '乌龙奶茶', 11.00, 3);
INSERT INTO `t_drink` VALUES (9, '2021-09-23', '焦糖奶茶', 12.00, 3);
COMMIT;

-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `customer` varchar(255) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `state` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of t_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for t_order_drink
-- ----------------------------
DROP TABLE IF EXISTS `t_order_drink`;
CREATE TABLE `t_order_drink` (
  `drink_order_id` bigint NOT NULL,
  `items_id` bigint NOT NULL,
  `items_quantity` int NOT NULL DEFAULT '1',
  PRIMARY KEY (`drink_order_id`,`items_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of t_order_drink
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
